package com.sky.mapper.courier;

import com.sky.pojo.ShortUrl;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

/**
 * @Description ShotUriMapper
 * @Author lyh
 * @Date 2024-11-05
 */
public interface ShotUriMapper {
    @Insert("insert into tb_short_url_info (short_url, full_url, short_code, expire_time, trade_no) \n" +
            "values (#{shortUrl},#{fullUrl},#{shortCode},#{expireTime},#{tradeNo}) ")
    void save(ShortUrl shotUri);
    @Select("select full_url from tb_short_url_info where short_code=#{code}")
    String getLongUrl(String code);
}
